package com.demo.component;

import com.demo.model.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;


/**
 * @program: spring-demo2
 * @author: JCM
 * @create: 2023-02-23 11:00
 * @description:
 **/
@Component
public class StudentBeans {

    @Bean(name = {"s1","s2"})
    public Student student1() {
        //  伪代码，仅供测试使用
        Student stu = new Student();
        stu.setAge(18);
        stu.setId(1);
        stu.setName("bit");
        return stu;
    }


}
